<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        input{
            width: 300px;
            height: 50px;
        }
    </style>
</head>
<body>
    <!-- v-model：实现数据的双向绑定，目前用在表单元素 -->
    <div class="app">
        <h2>{{msg}}</h2>
        <input type="text" v-model="ads">
        <input type="button" value="提交" @click='lang'>
    </div>

    <script src="./node_modules/_vue@2.5.22@vue/dist/vue.js"></script>
    <script>
        var vm = new Vue({
            el:'.app',
            data:{
                msg:"春风吹,战鼓擂,你是憨憨你怕谁",
                ads:""
            },
            methods:{
                lang(){
                    this.msg = this.ads
                }
            }
        })
    </script>
</body>
</html>